package com.xs.batch.repository;

import com.xs.batch.entity.Order;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.time.LocalDateTime;

public interface OrderRepository extends JpaRepository<Order, Long> {
    Page<Order> findByStatusAndCreatedAtBefore(String status, LocalDateTime deadline, Pageable pageable);
    Page<Order> findByStatus(String status);
}